//
//  UIView+Extension.h
//  XCY
//
//  Created by XCY
//  Copyright (c) 2015年 HQ. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Extension)

@property (nonatomic, assign) float x;
@property (nonatomic, assign) float y;
@property (nonatomic, assign) float centerX;
@property (nonatomic, assign) float centerY;
@property (nonatomic, assign) float width;
@property (nonatomic, assign) float height;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint origin;

/**
 *  递归获取父类
 *
 *  @param currentView 当前的View
 *  @param cls         指定到的class后退出
 *
 *  @return
 */
+ (id)superViewWithView:(UIView *)currentView cls:(Class)cls;

/**
 *  递归获取子类
 *
 *  @param supView 当前的View
 *  @param cls     匹配的class
 *  @param resultViews 匹配返回的集合
 *  @return
 */
+ (void)findWithView:(UIView *)supView cls:(Class)cls resultViews:(NSMutableArray<UIView *> *)views;

//高度是0.001的view
+ (UIView *)zero;
@end
